<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QXmlLexicalHandler Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QXmlLexicalHandler Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QXmlLexicalHandler class provides an interface to report the
lexical content of XML data. <a href="#details">More...</a></p>

<p>Inherited by <a href="qxmldefaulthandler.html">QXmlDefaultHandler</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qxmllexicalhandler.html#QXmlLexicalHandler">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qxmllexicalhandler.html#QXmlLexicalHandler-2">__init__</a></b> (<i>self</i>, QXmlLexicalHandler)</li><li><div class="fn" />bool <b><a href="qxmllexicalhandler.html#comment">comment</a></b> (<i>self</i>, QString&#160;<i>ch</i>)</li><li><div class="fn" />bool <b><a href="qxmllexicalhandler.html#endCDATA">endCDATA</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmllexicalhandler.html#endDTD">endDTD</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmllexicalhandler.html#endEntity">endEntity</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QString <b><a href="qxmllexicalhandler.html#errorString">errorString</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmllexicalhandler.html#startCDATA">startCDATA</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmllexicalhandler.html#startDTD">startDTD</a></b> (<i>self</i>, QString&#160;<i>name</i>, QString&#160;<i>publicId</i>, QString&#160;<i>systemId</i>)</li><li><div class="fn" />bool <b><a href="qxmllexicalhandler.html#startEntity">startEntity</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlLexicalHandler class provides an interface to report the
lexical content of XML data.</p>
<p>The events in the lexical handler apply to the entire document,
not just to the document element, and all lexical handler events
appear between the content handler's startDocument and endDocument
events.</p>
<p>You can set the lexical handler with <a href="qxmlreader.html#setLexicalHandler">QXmlReader.setLexicalHandler</a>().</p>
<p>This interface's design is based on the SAX2 extension
LexicalHandler.</p>
<p>The interface provides the <a href="qxmllexicalhandler.html#startDTD">startDTD</a>(), <a href="qxmllexicalhandler.html#endDTD">endDTD</a>(), <a href="qxmllexicalhandler.html#startEntity">startEntity</a>(), <a href="qxmllexicalhandler.html#endEntity">endEntity</a>(), <a href="qxmllexicalhandler.html#startCDATA">startCDATA</a>(), <a href="qxmllexicalhandler.html#endCDATA">endCDATA</a>() and <a href="qxmllexicalhandler.html#comment">comment</a>() functions.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QXmlLexicalHandler" />QXmlLexicalHandler.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QXmlLexicalHandler-2" />QXmlLexicalHandler.__init__ (<i>self</i>, <a href="qxmllexicalhandler.html">QXmlLexicalHandler</a>)</h3><h3 class="fn"><a name="comment" />bool QXmlLexicalHandler.comment (<i>self</i>, QString&#160;<i>ch</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to report an XML comment anywhere
in the document. It reports the text of the comment in
<i>ch</i>.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmllexicalhandler.html#errorString">errorString</a>() to get the
error message.</p>


<h3 class="fn"><a name="endCDATA" />bool QXmlLexicalHandler.endCDATA (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to report the end of a CDATA
section.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmllexicalhandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmllexicalhandler.html#startCDATA">startCDATA</a>() and <a href="qxmlcontenthandler.html#characters">QXmlContentHandler.characters</a>().</p>


<h3 class="fn"><a name="endDTD" />bool QXmlLexicalHandler.endDTD (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to report the end of a DTD
declaration, if any.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmllexicalhandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmllexicalhandler.html#startDTD">startDTD</a>().</p>


<h3 class="fn"><a name="endEntity" />bool QXmlLexicalHandler.endEntity (<i>self</i>, QString&#160;<i>name</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to report the end of an entity
called <i>name</i>.</p>
<p>For every <a href="qxmllexicalhandler.html#startEntity">startEntity</a>() call, there
is a corresponding endEntity() call. The calls to <a href="qxmllexicalhandler.html#startEntity">startEntity</a>() and
endEntity() are properly nested.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmllexicalhandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmllexicalhandler.html#startEntity">startEntity</a>(), <a href="qxmlcontenthandler.html#skippedEntity">QXmlContentHandler.skippedEntity</a>(),
and <a href="qxmlsimplereader.html#setFeature">QXmlSimpleReader.setFeature</a>().</p>


<h3 class="fn"><a name="errorString" />QString QXmlLexicalHandler.errorString (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to get an error string if any of
the handler functions returns false.</p>


<h3 class="fn"><a name="startCDATA" />bool QXmlLexicalHandler.startCDATA (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to report the start of a CDATA
section. The content of the CDATA section is reported through the
<a href="qxmlcontenthandler.html#characters">QXmlContentHandler.characters</a>()
function. This function is intended only to report the
boundary.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmllexicalhandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmllexicalhandler.html#endCDATA">endCDATA</a>().</p>


<h3 class="fn"><a name="startDTD" />bool QXmlLexicalHandler.startDTD (<i>self</i>, QString&#160;<i>name</i>, QString&#160;<i>publicId</i>, QString&#160;<i>systemId</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to report the start of a DTD
declaration, if any. It reports the name of the document type in
<i>name</i>, the public identifier in <i>publicId</i> and the
system identifier in <i>systemId</i>.</p>
<p>If the public identifier is missing, <i>publicId</i> is set to
an empty string. If the system identifier is missing,
<i>systemId</i> is set to an empty string. Note that it is not
valid XML to have a public identifier but no system identifier; in
such cases a parse error will occur.</p>
<p>All declarations reported through <a href="qxmldtdhandler.html">QXmlDTDHandler</a> or <a href="qxmldeclhandler.html">QXmlDeclHandler</a> appear between the
startDTD() and <a href="qxmllexicalhandler.html#endDTD">endDTD</a>() calls.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmllexicalhandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmllexicalhandler.html#endDTD">endDTD</a>().</p>


<h3 class="fn"><a name="startEntity" />bool QXmlLexicalHandler.startEntity (<i>self</i>, QString&#160;<i>name</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>The reader calls this function to report the start of an entity
called <i>name</i>.</p>
<p>Note that if the entity is unknown, the reader reports it
through <a href="qxmlcontenthandler.html#skippedEntity">QXmlContentHandler.skippedEntity</a>()
and not through this function.</p>
<p>If this function returns false the reader stops parsing and
reports an error. The reader uses the function <a href="qxmllexicalhandler.html#errorString">errorString</a>() to get the
error message.</p>
<p><b>See also</b> <a href="qxmllexicalhandler.html#endEntity">endEntity</a>() and <a href="qxmlsimplereader.html#setFeature">QXmlSimpleReader.setFeature</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>